package com.stars.services.job;

import com.stars.entity.job.MyScheduleJobEntity;

import com.stars.services.BaseConfigService;

/**
 * @author dj
 * @version V1.0
 * @Title: 任务调度 业务逻辑
 * @date 2019-10-12 13:54:31
 */
public interface MyScheduleJobConfigServices extends BaseConfigService<MyScheduleJobEntity> {
    /**
     * 新增定时任务
     * @param job 任务
     * @author lanjerry
     * @date 2019/1/28 15:37
     */
    void add(MyScheduleJobEntity job)throws Exception;
    void addJob(String [] ids)throws Exception;
    /**
     * 启动定时任务
     * @param job 任务id
     * @author lanjerry
     * @date 2019/1/28 16:49
     */
    void start(MyScheduleJobEntity job)throws Exception;
    /**
     * 暂停定时任务
     * @param job 任务id
     * @author lanjerry
     * @date 2019/1/28 16:49
     */
    void pause(MyScheduleJobEntity job)throws Exception;
    /**
     * 删除定时任务
     * @param job 任务id
     * @author lanjerry
     * @date 2019/1/28 16:49
     */
    void deleteById(MyScheduleJobEntity job)throws Exception;
    /**
     * 启动所有定时任务
     * @author lanjerry
     * @date 2019/1/28 16:49
     */
    void startAllJob()throws Exception;
    /**
     * 暂停所有定时任务
     * @author lanjerry
     * @date 2019/1/28 16:49
     */
    void pauseAllJob()throws Exception;
}